<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <include file="Public:resource"/>
    <title>预存充值结果</title>
</head>
<body>
<div class="container">
    <include file="Public:top" title="预存充值结果"/>

    <div class="row" style="padding:10px 0px 10px 0px;color: #00FF00;font-size: larger;"
         align="center">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            充值成功!
        </div>
    </div>

    <include file="Public:bar" text="账户信息"/>

    <div style="font-size: medium">
        <div class="row">
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" align="right">
                水费账号:
            </div>
            <div class="col-xs-7 col-sm-7 col-md-7 col-lg-7 c-gray">
                {$rechargeResult.userId}
            </div>
        </div>
        <div class="row">
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" align="right">
                户名:
            </div>
            <div class="col-xs-7 col-sm-7 col-md-7 col-lg-7 c-gray">
                {$rechargeResult.name}
            </div>
        </div>
        <div class="row">
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" align="right">
                地址:
            </div>
            <div class="col-xs-7 col-sm-7 col-md-7 col-lg-7 c-gray">
                {$rechargeResult.address}
            </div>
        </div>
        <div class="row">
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" align="right">
                上次余额:
            </div>
            <div class="col-xs-7 col-sm-7 col-md-7 col-lg-7 c-red">
                ￥{$rechargeResult.lastBalance}元
            </div>
        </div>
        <div class="row">
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" align="right">
                本次充值:
            </div>
            <div class="col-xs-7 col-sm-7 col-md-7 col-lg-7 c-red">
                ￥{$rechargeResult.charge}元
            </div>
        </div>
        <div class="row">
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" align="right">
                本次余额:
            </div>
            <div class="col-xs-7 col-sm-7 col-md-7 col-lg-7 c-red">
                ￥
                <script>
                    var lastInYuan = parseFloat('{$rechargeResult.lastBalance}');
                    var chargeInYuan = parseFloat('{$rechargeResult.charge}');
                    var lastInFen = parseInt(lastInYuan * 100);
                    var chargeInFen = parseInt(chargeInYuan * 100);
                    var newBalanceInYuan = (parseFloat(lastInFen + chargeInFen) / 100).toFixed(2);
                    document.write(newBalanceInYuan);
                </script>
                元
            </div>
        </div>
        <div class="row">
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" align="right">
                充值时间:
            </div>
            <div class="col-xs-7 col-sm-7 col-md-7 col-lg-7 c-gray">
                {$rechargeResult.payTime}
            </div>
        </div>
    </div>

    <div class="row" style="margin-top: 20px;">
        <div class="col-xs-12 col-sm-12 col-mg-12 col-md-12">
            <div><input type="button" class="btn btn-lg btn-block jss-button"
                        onclick="onBack() " value="确定"/>
            </div>
        </div>
    </div>
</div>
<script>
    function onBack() {
        window.location.href = "{:U('PreSave/index')}";
    }
</script>
</body>
</html>